﻿#include <stdio.h>

void swap(int a[], int i, int j)
{
    int tmp = a[i];
    a[i] = a[j];
    a[j] = tmp;
}

int main(int argc, char *argv[])
{
    int x[10] = {2,3,5,1,0,9,8,6,7,4};
    int k,m,y;

    for(k=0;k<10-1;k++)
    {
        for(m=0;m<10-1-k;m++)
        {
            if(x[m]>x[m+1])
                swap(x, m, m+1);
        }
    }


    for(y=0;y<10;y++)
    {
        printf("%d",x[y]);
    }
    printf("\n");

    return 0;
}
